﻿using System;
using System.Collections.Generic;
using System.ComponentModel;
using System.Data;
using System.Drawing;
using System.Text;
using System.Windows.Forms;

namespace equinox_proto
{
    class BusquedaClienteForm : Form
    {
        private Panel panel1;
        private Button botonSeleccionar;
        private Label resultadosLabel;
        private RadioButton radioButtonResultado;
        public BusquedaClienteForm(List<ClienteModel> clientes)
        {
            InitializeComponent();
            inicializar(clientes);
        }
        private void InitializeComponent()
        {
            System.ComponentModel.ComponentResourceManager resources = new System.ComponentModel.ComponentResourceManager(typeof(BusquedaClienteForm));
            this.panel1 = new System.Windows.Forms.Panel();
            this.botonSeleccionar = new System.Windows.Forms.Button();
            this.resultadosLabel = new System.Windows.Forms.Label();
            this.panel1.SuspendLayout();
            this.SuspendLayout();
            // 
            // panel1
            // 
            this.panel1.Anchor = ((System.Windows.Forms.AnchorStyles)((((System.Windows.Forms.AnchorStyles.Top | System.Windows.Forms.AnchorStyles.Bottom) 
            | System.Windows.Forms.AnchorStyles.Left) 
            | System.Windows.Forms.AnchorStyles.Right)));
            this.panel1.AutoScroll = true;
            this.panel1.Controls.Add(this.botonSeleccionar);
            this.panel1.Controls.Add(this.resultadosLabel);
            this.panel1.Location = new System.Drawing.Point(12, 12);
            this.panel1.Name = "panel1";
            this.panel1.Size = new System.Drawing.Size(515, 443);
            this.panel1.TabIndex = 0;
            // 
            // botonSeleccionar
            // 
            this.botonSeleccionar.Location = new System.Drawing.Point(361, 19);
            this.botonSeleccionar.Name = "botonSeleccionar";
            this.botonSeleccionar.Size = new System.Drawing.Size(110, 30);
            this.botonSeleccionar.TabIndex = 2;
            this.botonSeleccionar.Text = "Seleccionar";
            this.botonSeleccionar.UseVisualStyleBackColor = true;
            // 
            // resultadosLabel
            // 
            this.resultadosLabel.AutoSize = true;
            this.resultadosLabel.Font = new System.Drawing.Font("Arial", 13.8F, System.Drawing.FontStyle.Regular, System.Drawing.GraphicsUnit.Point, ((byte)(0)));
            this.resultadosLabel.Location = new System.Drawing.Point(29, 14);
            this.resultadosLabel.Name = "resultadosLabel";
            this.resultadosLabel.Size = new System.Drawing.Size(133, 27);
            this.resultadosLabel.TabIndex = 1;
            this.resultadosLabel.Text = "Resultados";
            // 
            // BusquedaClienteForm
            // 
            this.ClientSize = new System.Drawing.Size(336, 255);
            this.Icon = ((System.Drawing.Icon)(resources.GetObject("$this.Icon")));
            this.Name = "BusquedaClienteForm";
            this.Text = "Resultados de la busqueda";
            this.panel1.ResumeLayout(false);
            this.panel1.PerformLayout();
            this.ResumeLayout(false);

        }
        private void inicializar(List<ClienteModel> clientes)
        {
            for (int i = 0; i < clientes.ToArray().Length; i++)
            {
                this.radioButtonResultado = new System.Windows.Forms.RadioButton();
                // 
                // radioButtonResultado
                // 
                this.radioButtonResultado.AutoSize = true;
                this.radioButtonResultado.Location = new System.Drawing.Point(34, 60 + i*20);
                this.radioButtonResultado.Name = "radioButtonResultado";
                this.radioButtonResultado.Size = new System.Drawing.Size(17, 16);
                this.radioButtonResultado.TabIndex = 0;
                this.radioButtonResultado.TabStop = true;
                this.radioButtonResultado.UseVisualStyleBackColor = true;
                this.radioButtonResultado.Text = clientes.ToArray()[i].NombreReferencia;
                this.panel1.Controls.Add(this.radioButtonResultado);
            }
            // 
            // BusquedaClienteForm
            // 
            this.ClientSize = new System.Drawing.Size(539, 467);
            this.Controls.Add(this.panel1);
            this.Name = "BusquedaClienteForm";
            this.panel1.ResumeLayout(false);
            this.panel1.PerformLayout();
            this.ResumeLayout(false);
        }
    }
}
